/**
 * @see [微信官方文档](https://mp.weixin.qq.com/debug/wxadoc/dev/api/setKeepScreenOn.html)
 * @param keepScreenOn [boolean] 是否保持屏幕常亮
 */
export default function set_keep_screen_on(keepScreenOn: boolean) {
	return new Promise<boolean>((resolve, reject) => {
		wx.setKeepScreenOn({
			keepScreenOn,
			fail() {
				reject(false);
			},
			success() {
				resolve(true);
			}
		});
	});
}
